/**
 * 配置编译环境和线上环境之间的切换
 * baseUrl: 域名地址
 */
const evnUrl = {
	LocBaseUrl: window.location.origin,
	apiBaseUrl: 'http://47.117.117.139:3000/api'
}
switch (process.env.VUE_APP_REQUESTTYPE) {
	case 'dev':
		evnUrl.apiBaseUrl = `http://${window.location.hostname}:3000/api`;
		break;
	case 'test':
		evnUrl.apiBaseUrl = 'https://portal-test.zmlearn.com/api';
		break;
	default:
		break;
}
/**
 * 根据需要选取需要的headers；
 * @param {*} url 
 */
const checkingNeedToken = function (url) {
	let pathArr = [  //不需要token的接口列表
		"api/path",
	];
	return !pathArr.includes(url)
}
export {
	evnUrl,
	checkingNeedToken	
}